%{
	#include "builder.tab.h"
	#include "../xpression-drawer/Constants.h"
	
	//TODO: avoid Phi and Theta redundancy (VARIABLE type)
%}

BLANK		[ \t]+

DIGIT		[0-9]
INTEGER 	{DIGIT}+
DECIMAL		{INTEGER}(,{INTEGER})*

%%

{BLANK} 			{ /* Do Nothing */ }

{DECIMAL}			{ yylval.value = atof(yytext); return (CONSTANT); }
"pi"				{ yylval.value = MATH_PI; return (CONSTANT); }
"e"					{ yylval.value = MATH_EXP; return (CONSTANT); }

"P"			 		return (PHI); 
"T"					return (THETA); 

"+"					return (PLUS);
"-"					return (MINUS);
"*"					return (MULTIPLY);
"/"					return (DIVIDE);
"^"					return (POW);

"ln"				return (LN);
"cos"				return (COS);
"sin"				return (SIN);
"log"				return (LOG);

"("					return (LEFT_BRACKET);
")"					return (RIGHT_BRACKET);

"->"				return (SEPARATOR);
"|"					return (COMBINATION);
